<?php
   /*
    * 前台信息
    */
   class Info extends Index{
   	
	   	public function __construct(){
	   		parent::__construct();
	   	}
		
		public function InfosList(){
			$categoryid = intval($_GET['categoryid']);
			$category = DB::fetch_row("select *from `bb_category` as C left join `bb_category_setting` as CS 
				            on `C`.`categoryid`=`CS`.`categoryid` where `C`.`categoryid`='{$categoryid}'");
			$path    = $category['path'];
			$infoSql = "select *from `bb_info` as I left join `bb_info_info` as II on I.`infoid`=II.`infoid` where `I`.`categoryid`='{$categoryid}'";
			$page  = new Page($category['infonum'],$infoSql);
			$infos      = $page->content;
			$page_html  = $page->page_html("?m=Index/Info/InfoList&categoryid={$categoryid}");
			foreach($infos as $key=>$val){
				$infos[$key]['date'] = date("Y-m-d",$val['createtime']);
			}
			$this->frontSmarty->assign("infolist",$infos);
			$this->frontSmarty->assign("page",$page_html);
			$this->frontSmarty->display("Html/{$path}/HeaderGroup/Index".$this->terminal.".html");
			$this->frontSmarty->display("Html/{$path}/ListGroup/Index".$this->terminal.".html");
			$this->frontSmarty->display("Html/{$path}/FooterGroup/Index".$this->terminal.".html");
		}
   	
   }



?>